import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx/common/routers/index.dart';
import 'package:getx/common/utils/screen_adapter_util.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    ScreenAdapterUtil.initialize(context, standardSize: 375);
    return GetMaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        platform: TargetPlatform.iOS,
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
        appBarTheme: AppBarTheme(
          backgroundColor: Colors.white,
          titleTextStyle: TextStyle(
            fontSize: 18.rpx,
            fontWeight: FontWeight.bold,
            color: Colors.black,
          ),
          centerTitle: true,
          iconTheme: IconThemeData(
            size: 18.rpx,
          ),
        ),
      ),
      getPages: RoutePages.list,
      initialRoute: RouteNames.main,
      defaultTransition: Transition.cupertino, // 设置跳转样式
    );
  }
}
